#include <iostream>

int Hash(char i)
{
    return i - 'a';
}

int main()
{
    int hash[26] = {0}; // 准备一个哈希表
    std::string randsNode = "hash";
    std::string Magazine = "hashsh";

    for (int i = 0; i < randsNode.size(); i++)
    {
        hash[Hash(randsNode[i])]++;  
    }
    for (int i = 0; i < Magazine.size(); i++)
    {
        hash[Hash(Magazine[i])]--; 
    }

    int count = 0;
    for (int i = 0; i < 26; i++)
    {
        if (hash[i] > 0)
        {
            std::cout<<"false"<<std::endl;
        }
    }
    std::cout<<"true"<<std::endl;
    return 0;
}

